package com.teknei.acabus.core.entities;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The persistent class for the "NAVIGATION_PARENT_ROLES" database table.
 * @author Jorge Amaro
 * @version 1.0
 * @since 1.0
 * 
 */
@Entity
@Table(name = "\"SITM_NAVIGATION_PARENT_ROLES\"")
@NamedQuery(name = "NavigationParentRole.findAll", query = "SELECT n FROM NavigationParentRole n")
public class NavigationParentRole implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name = "NAVIGATION_PARENT_ROLES_ID_GENERATOR", sequenceName = "\"NAVIGATION_PARENT_ROLES_id_seq\"")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "NAVIGATION_PARENT_ROLES_ID_GENERATOR")
	private Integer id;

	// bi-directional many-to-one association to NavigationParent
	@ManyToOne
	@JoinColumn(name = "id_nav")
	private NavigationParent parent;

	// bi-directional many-to-one association to Role
	@ManyToOne
	@JoinColumn(name = "id_role")
	private Role role;

	/**
	 * 
	 */
	public NavigationParentRole() {
	}

	/**
	 * @return
	 */
	public Integer getId() {
		return this.id;
	}

	/**
	 * @param id
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * @return
	 */
	public Role getRole() {
		return this.role;
	}

	/**
	 * @param role
	 */
	public void setRole(Role role) {
		this.role = role;
	}

	/**
	 * @return the parent
	 */
	public NavigationParent getParent() {
		return parent;
	}

	/**
	 * @param parent
	 *            the parent to set
	 */
	public void setParent(NavigationParent parent) {
		this.parent = parent;
	}

}